<%@ Page Language="c#" AutoEventWireup="true" MasterPageFile="~/MasterPages/Main.Master" CodeFile="BlogResponse.aspx.cs" Inherits="_BlogResponse" Title="BlogResponse" %>

<asp:Content ID="Main" ContentPlaceHolderID="body" runat="server">
	<asp:Panel ID="blogResponseDetail" Width="100%" runat="server">
		<fieldset>
			<legend>BlogResponse Detail</legend>
			<asp:GridView ID="blogResponseGrid" AllowPaging="True" AllowSorting="True" BorderColor="White"
				BorderStyle="Ridge" CellSpacing="0" CellPadding="3" BackColor="#ffffff" AutoGenerateColumns="false"
				DataSourceID="blogResponseSource" runat="server" Width="100%" EnableSortingAndPagingCallbacks="True">
				<HeaderStyle BackColor="#ffffff" HorizontalAlign="left" Font-Bold="true" />
				<AlternatingRowStyle BackColor="#CCCC99" />
				<PagerSettings Mode="NumericFirstLast" Position="Bottom" />
				<Columns>
					<asp:HyperLinkField HeaderText="ID" DataTextField="Id" SortExpression="Id" DataNavigateUrlFields="Id"
					DataNavigateUrlFormatString="~/SampleForms/BlogResponse.aspx?BlogResponseId={0}" Target="_parent" />
					<asp:BoundField HeaderText="Name" DataField="Name" SortExpression="Name" />
					<asp:BoundField HeaderText="Email" DataField="Email" SortExpression="Email" />
					<asp:BoundField HeaderText="Comment" DataField="Comment" SortExpression="Comment" />
					<asp:BoundField HeaderText="Createdate" DataField="Createdate" SortExpression="Createdate" />
				</Columns>
			</asp:GridView>		
		</fieldset>
	</asp:Panel>
    <asp:FormView ID="blogResponseView" DataSourceID="blogResponseDetailSource" DataKeyNames="Id"
	    OnModeChange="blogResponseView_ModeChanged" Width="100%" runat="server">
        <ItemTemplate>
			 <fieldset>
				<legend>BlogResponse Detail</legend>
				<ol>
				<li>
				<asp:Label ID="idLabel" Text="Id" runat="server"/>
				<asp:Label ID="id" Text='<%# Eval("Id") %>' CssClass="formText" runat="server" />
				</li>
				<li>
				<asp:Label ID="nameLabel" Text='Name' runat="server"/>
				<asp:Label ID="name" Text='<%# Eval("Name") %>' Enabled="false" CssClass="formText" runat="server" />
				</li>
				<li>
				<asp:Label ID="emailLabel" Text='Email' runat="server"/>
				<asp:Label ID="email" Text='<%# Eval("Email") %>' Enabled="false" CssClass="formText" runat="server" />
				</li>
				<li>
				<asp:Label ID="commentLabel" Text='Comment' runat="server"/>
				<asp:Label ID="comment" Text='<%# Eval("Comment") %>' Enabled="false" CssClass="formText" runat="server" />
				</li>
				<li>
				<asp:Label ID="createdateLabel" Text='Createdate' runat="server"/>
				<asp:Label ID="createdate" Text='<%# Eval("Createdate") %>' Enabled="false" CssClass="formText" runat="server" />
				</li>
			    </ol>
			 </fieldset>
			 <asp:Button ID="add" CommandName="New" Text="Add" runat="server" />
			 <asp:Button ID="edit" CommandName="Edit" Text="Edit" runat="server" />
			 <asp:Button ID="delete" CommandName="Delete" Text="Delete" runat="server" />
		</ItemTemplate>
		<InsertItemTemplate>
			 <fieldset>
				<legend>New BlogResponse Detail</legend>
				<ol>
				<li>
				<asp:Label ID="nameLabel" Text='Name' runat="server"/><br/>
				<asp:TextBox id="name" Text='<%# Bind("Name") %>' Columns="50" CssClass="formText" runat="server" />
				</li>
				<li>
				<asp:Label ID="emailLabel" Text='Email' runat="server"/><br/>
				<asp:TextBox id="email" Text='<%# Bind("Email") %>' Columns="50" CssClass="formText" runat="server" />
				</li>
				<li>
				<asp:Label ID="commentLabel" Text='Comment' runat="server"/><br/>
				<asp:TextBox id="comment" Text='<%# Bind("Comment") %>' TextMode="MultiLine" Columns="50" CssClass="formText" runat="server" /><asp:RequiredFieldValidator ID="comment_RequiredFieldValidator" ControlToValidate="comment" Text="*" ErrorMessage="'Comment' is required." SetFocusOnError="True" runat="server"/>
				</li>
				<li>
				<asp:Label ID="createdateLabel" Text='Createdate' runat="server"/>
				<asp:TextBox id="createdate" Text='<%# Bind("Createdate") %>' CssClass="formText" runat="server" /><asp:RequiredFieldValidator ID="createdate_RequiredFieldValidator" ControlToValidate="createdate" Text="*" ErrorMessage="'Createdate' is required." SetFocusOnError="True" runat="server"/>
				<asp:Calendar id="createdateCal" OnSelectionChanged="createdateCal_SelectionChanged" runat="server" />
				</li>
				<li>
				<asp:Label ID="blogEntryLabel" Text='BlogEntry' runat="server"/>
				<asp:DropDownList id="blogEntry" DataSourceId="BlogEntrySource" DataTextField="Id" DataValueField="Id" SelectedValue='<%# Bind("BlogEntryId") %>' CssClass="formText" runat="server" />
				</li>
				</ol>
			 </fieldset>
             <asp:Button ID="submit" CommandName="Insert" Text="Save" runat="server" />
        </InsertItemTemplate>
		<EditItemTemplate>
			<fieldset>
				<legend>Edit BlogResponse Detail</legend>
				<ol>
				<li>
				<asp:Label ID="idLabel" Text="Id" runat="server"/>
				<asp:Label Id="id" Text='<%# Bind("Id") %>' CssClass="formText" runat="server" />
				</li>
				<li>
				<asp:Label ID="nameLabel" Text='Name' runat="server"/><br/>
				<asp:TextBox id="name" Text='<%# Bind("Name") %>' Columns="50" CssClass="formText" runat="server" />
				</li>
				<li>
				<asp:Label ID="emailLabel" Text='Email' runat="server"/><br/>
				<asp:TextBox id="email" Text='<%# Bind("Email") %>' Columns="50" CssClass="formText" runat="server" />
				</li>
				<li>
				<asp:Label ID="commentLabel" Text='Comment' runat="server"/><br/>
				<asp:TextBox id="comment" Text='<%# Bind("Comment") %>' TextMode="MultiLine" Columns="50" CssClass="formText" runat="server" /><asp:RequiredFieldValidator ID="comment_RequiredFieldValidator" ControlToValidate="comment" Text="*" ErrorMessage="'Comment' is required." SetFocusOnError="True" runat="server"/>
				</li>
				<li>
				<asp:Label ID="createdateLabel" Text='Createdate' runat="server"/>
				<asp:TextBox id="createdate" Text='<%# Bind("Createdate") %>' CssClass="formText" runat="server" /><br><asp:Calendar id="createdateCal" OnSelectionChanged="createdateCal_SelectionChanged" runat="server" /><asp:RequiredFieldValidator ID="createdate_RequiredFieldValidator" ControlToValidate="createdate" Text="*" ErrorMessage="'Createdate' is required." SetFocusOnError="True" runat="server"/>
				</li>
				<li>
				<asp:Label ID="blogEntryLabel" Text='BlogEntry' runat="server"/>
				<asp:DropDownList id="blogEntry" DataSourceId="BlogEntrySource" DataTextField="Id" DataValueField="Id" SelectedValue='<%# Bind("BlogEntryId") %>' runat="server" />
				</li>
				</ol>
			 </fieldset>
             <asp:Button ID="submit" CommandName="Update" Text="Save" runat="server" />
        </EditItemTemplate>
		<EmptyDataTemplate>
				<fieldset>
				<legend>BlogResponse Detail</legend>
				No Record Selected
				</fieldset>
			<asp:Button ID="add" CommandName="New" Text="Add" runat="server" />
		</EmptyDataTemplate>
    </asp:FormView>
	<asp:ObjectDataSource ID="blogResponseSource" TypeName="Blog.Net.DataAccess.DataControls.BlogResponseDataControl"
		DataObjectTypeName="Blog.Net.Business.BusinessObjects.BlogResponseBO" SelectMethod="GetAll" SelectCountMethod="GetCountOfAll"
		InsertMethod="Save" UpdateMethod="Save" MaximumRowsParameterName="maxResults" StartRowIndexParameterName="firstResult"
		SortParameterName="sortExpression" EnablePaging="True" runat="server" >
		<InsertParameters>
            <asp:Parameter Name="blogResponse" Type="Object" />
            <asp:Parameter Direction="Output" Name="id" Type="Object" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="blogResponse" Type="Object" />
            <asp:Parameter Direction="Output" Name="id" Type="Object" />
        </UpdateParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="blogResponseDetailSource" SelectMethod="GetById" InsertMethod="Save" UpdateMethod="Save" DeleteMethod="Delete" DataObjectTypeName="Blog.Net.Business.BusinessObjects.BlogResponseBO"
        TypeName="Blog.Net.DataAccess.DataControls.BlogResponseDataControl" runat="server">
		<SelectParameters>
            <asp:QueryStringParameter Name="id" QueryStringField="BlogResponseId" Type="Int32" />
        </SelectParameters>
		<InsertParameters>
            <asp:Parameter Name="blogResponse" Type="Object" />
            <asp:Parameter Direction="Output" Name="id" Type="Object" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="blogResponse" Type="Object" />
            <asp:Parameter Direction="Output" Name="id" Type="Object" />
        </UpdateParameters>
		<DeleteParameters>
            <asp:Parameter Name="blogResponse" Type="Object" />
        </DeleteParameters>
    </asp:ObjectDataSource>
	<asp:ObjectDataSource ID="BlogEntrySource" SelectMethod="GetAll" TypeName="Blog.Net.DataAccess.DataControls.BlogEntryDataControl" runat="server"></asp:ObjectDataSource>
</asp:Content>